package com.xmlstrategys
{
	import com.strategy.IXML;
	import com.utils.Utils;
	
	import flash.utils.ByteArray;

	public class XMLAutoMatismInfo extends XMLBase implements IXML
	{
		public function XMLAutoMatismInfo(data:XML)
		{
			super(data);
		}
		
		public function xmlstrategybml():ByteArray
		{
			var sourceByte:ByteArray = Utils.writeHead(8);
			var nodeLen:uint = xmlData.maps.length();
			sourceByte.writeUnsignedInt(nodeLen);
			
			for each (var xml:XML in xmlData.maps){
				sourceByte.writeInt(xml.@mapId);
				Utils.writeString(xml.@posXArr,sourceByte);
				Utils.writeString(xml.@posYArr,sourceByte);
				Utils.writeString(xml.@countArr,sourceByte);
			}
			
			return sourceByte;
		}
	}
}